package com.iw.core.security.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.iw.core.orm.hibernate.BaseDao;
import com.iw.core.orm.hibernate.BaseService;
import com.iw.core.security.dao.RolesDao;
import com.iw.core.security.entity.Roles;
import com.iw.core.security.entity.Users;

@Service
@Transactional
public class UsersService extends BaseService<Users> {
	@Resource(name = "rolesDao")
	private RolesDao rolesDao;

	@Override
	@Resource(name = "usersDao")
	public void setBaseDao(BaseDao<Users> baseDao) {
		this.baseDao = baseDao;
	}

	public List<Roles> findAllRoles() {
		return rolesDao.findAll();
	}

}
